package com.zlzxm.shoesmarket.net.repository;

import com.zlzxm.shoesmarket.net.BaseCallBack;
import com.zlzxm.shoesmarket.net.RetrofitClient;
import com.zlzxm.shoesmarket.net.api.InvApi;
import com.zlzxm.shoesmarket.net.request.RqInvAdd;
import com.zlzxm.shoesmarket.net.respone.BaseResponse;
import com.zlzxm.shoesmarket.net.respone.RpRepositoryGoods;

import io.reactivex.rxjava3.core.Observable;

/**
 * CREATE BY zlzxm ON 2021/5/24
 */
public class InvRepository {

    InvApi invApi = RetrofitClient.create(InvApi.class);


    public Observable<RpRepositoryGoods> list(String articleNumber,
                                              String ckId,
                                              String size){

        return  invApi.list(articleNumber,ckId,size);
    }

    public  Observable<BaseResponse<String>> add( RqInvAdd rqInvAdd){

        return invApi.add(rqInvAdd.getArticleNumber(),
                rqInvAdd.getCkId(),
                rqInvAdd.getNumber(),
                rqInvAdd.getPrice(),
                rqInvAdd.getPs(),
                rqInvAdd.getSize());
    }

}
